package org.momo.rpc.bootstrap.model;


import lombok.Data;

import lombok.Getter;
import org.momo.rpc.constant.LoadBalanceKey;

import java.util.HashMap;
import java.util.Map;

@Getter
public class ReferenceMetaInfo {

    public Class<?> referenceClass;

    public String serviceName;

    public String serviceVersion;

    public Map<String, LoadBalanceKey> loadBalanceMap;

    public ReferenceMetaInfo(Class<?> referenceClass, String serviceName, String serviceVersion, Map<String, LoadBalanceKey> loadBalanceKeyMap) {
        this.referenceClass = referenceClass;
        this.serviceName = serviceName;
        this.serviceVersion = serviceVersion;
        this.loadBalanceMap = loadBalanceKeyMap == null? new HashMap<>() : loadBalanceKeyMap;
    }

}
